import React from 'react'
import { getMenuSub } from 'services/utils'
import { Icon } from 'antd'
import UserInfo from './pages/user-info'
import UserLog from './pages/user-log'
import UserCharge from './pages/user-charge'
import Flag from 'config/flag'

const routes = {
  path: '/proto-role',
  name: '玩家信息类',
  childRoutes: [
    //{ path: 'default', name: 'Home', component: Screen, isIndex: true },
    { 
      path: 'user-info', 
      name: '玩家数据', 
      component: UserInfo, 
      flags: Flag['/proto-role/user-info'],
      description: '玩家信息查询，可以修改玩家的一些信息，进行封号、禁言的处理'
    },
    { 
      path: 'user-log', 
      name: '货币记录', 
      component: UserLog, 
      flags: Flag['/proto-role/user-log'],
      description: '查询指定玩家的货币使用记录'
    },
    { 
      path: 'user-charge', 
      name: '充值记录', 
      component: UserCharge, 
      flags: Flag['/proto-role/user-charge'],
      description: '查询单日系统充值记录'
    },
  ]
}

export default routes

export const menuSub = getMenuSub(routes, {
    key:   `proto-role`, 
    //name:  `帐号管理`, 
    icon:  <Icon type="wallet" />
  })